#define HASH_TABLE_SIZE 13
#define HASH_TABLE_SEARCH_CONFLICT_TIMES_CAPACITY HASH_TABLE_SIZE/2

typedef unsigned int DataType;
typedef unsigned long ULONG;

typedef struct
{
	DataType key;
	void *data;
}DATA_ELEM;

typedef struct
{
	ULONG size;
	ULONG elem_count;
	DATA_ELEM *array;
}HASH_TABLE;

ULONG hash(const DATA_ELEM *data_elem);
int init_hash(HASH_TABLE **hash_table);
int free_hash(HASH_TABLE *hash_table);
int search_hash(const HASH_TABLE *hash_table, const DATA_ELEM *data_elem, ULONG *index, ULONG *conflict_count);
int insert_elem_to_hash(HASH_TABLE *hash_table, DATA_ELEM *data_elem);
//int create_hash_table(const DataType *key_array);
int delete_elem_from_hash(HASH_TABLE *hash_table, DATA_ELEM *data_elem);
void display_hash_table(HASH_TABLE *hash_table);
